package com.guigu.ssyx.activity.entity;

import java.math.BigDecimal;

import com.atguigu.ssyx.enums.CouponRangeType;
import com.atguigu.ssyx.enums.CouponType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.atguigu.ssyx.model.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 优惠券信息
 * </p>
 *
 * @author liuyang
 * @since 2025-09-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("coupon_info")
@ApiModel(value="CouponInfo对象", description="优惠券信息")
public class CouponInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "购物券类型 1 现金券 2 满减券")
    @TableField("coupon_type")
    private CouponType couponType;

    @TableField(exist = false)
    private String couponTypeString;

    @ApiModelProperty(value = "优惠卷名字")
    @TableField("coupon_name")
    private String couponName;

    @ApiModelProperty(value = "金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty(value = "使用门槛 0->没门槛")
    @TableField("condition_amount")
    private BigDecimal conditionAmount;

    @ApiModelProperty(value = "可以领取的开始日期")
    @TableField("start_time")
    private LocalDate startTime;

    @ApiModelProperty(value = "可以领取的结束日期")
    @TableField("end_time")
    private LocalDate endTime;

    @ApiModelProperty(value = "使用范围[1->全场通用；2->指定分类；3->指定商品]")
    @TableField("range_type")
    private CouponRangeType rangeType;

    @TableField(exist = false)
    private String rangeTypeString;

    @ApiModelProperty(value = "使用范围描述")
    @TableField("range_desc")
    private String rangeDesc;

    @ApiModelProperty(value = "发行数量")
    @TableField("publish_count")
    private Integer publishCount;

    @ApiModelProperty(value = "每人限领张数")
    @TableField("per_limit")
    private Integer perLimit;

    @ApiModelProperty(value = "已使用数量")
    @TableField("use_count")
    private Integer useCount;

    @ApiModelProperty(value = "领取数量")
    @TableField("receive_count")
    private Integer receiveCount;

    @ApiModelProperty(value = "过期时间")
    @TableField("expire_time")
    private LocalDateTime expireTime;

    @ApiModelProperty(value = "发布状态[0-未发布，1-已发布]")
    @TableField("publish_status")
    private Boolean publishStatus;


}
